package com.jet.merchant.domain.vo;

import com.jet.merchant.domain.enums.AccountCashMode;
import com.jet.core.enums.CommonDeleted;
import com.jet.core.enums.CommonStatus;
import com.jet.core.enums.IEnum;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
public class UserVo implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;
    private long merchantNo;
    private String merchantName;
    private long storeNo;
    private String storeName;
    private boolean storeMain;
    private String name;
    private String phone;
    private String email;
    private int status;
    private String statusName;
    private int deleted;
    private String deletedName;
    private String roleId;
    private RoleVo role;
    private LocalDateTime createTime;
    private int mobileCashMode;
    private String mobileCashModeName;

    public String getStatusName() {
        return IEnum.getNameByCode(this.getStatus(), CommonStatus.class);
    }

    public String getDeletedName() {
        return IEnum.getNameByCode(this.getDeleted(), CommonDeleted.class);
    }

    public String getMobileCashModeName() {
        return IEnum.getNameByCode(this.getMobileCashMode(), AccountCashMode.class);
    }
}